﻿using CatUtils.Utils.SpecialUtils.Html;
using RabbitDownload.Helper.Currency;

namespace RabbitDownload.WebSite.Local.TagManger
{
    internal class LocalTagStatcivalue
    {
        /// <summary>
        /// 文本模式 krtag 为韩国标签翻译
        /// </summary>
        public const string TextMode = "<item><jptag>{0}</jptag><cntag>{1}</cntag><cntwtag>{2}</cntwtag><romatag>{3}</romatag><krtag>{4}</krtag><entag>{5}</entag></item>";

        /// <summary>
        /// 带图片数量模式
        /// </summary>
        public const string TagInfoMode = "<item><romatag>{0}</romatag><imgcount>{1}</imgcount></item>";

        public struct TranslateStruct
        {
            private string jpTag;
            private string zhTag;
            private string zhtwTag;
            private string enTag;
            private string romaTag;
            private string koTag;

            public TranslateStruct(string ItemInfo)
            {
                this.jpTag = HtmlHelper.GetFirstText(ItemInfo, "//jptag");
                this.zhTag = HtmlHelper.GetFirstText(ItemInfo, "//cntag");
                this.zhtwTag = HtmlHelper.GetFirstText(ItemInfo, "//cntwtag");
                this.enTag = HtmlHelper.GetFirstText(ItemInfo, "//entag");
                this.romaTag = HtmlHelper.GetFirstText(ItemInfo, "//romatag");
                this.koTag = HtmlHelper.GetFirstText(ItemInfo, "//kotag");
            }

            /// <summary>
            /// 日文标签
            /// </summary>
            public string JpTag { get => jpTag; set => jpTag = value; }

            /// <summary>
            /// 中文标签
            /// </summary>
            public string ZhTag { get => zhTag; set => zhTag = value; }

            /// <summary>
            /// 繁体中文
            /// </summary>
            public string ZhtwTag { get => zhtwTag; set => zhtwTag = value; }

            /// <summary>
            /// 英文标签
            /// </summary>
            public string EnTag { get => enTag; set => enTag = value; }

            /// <summary>
            /// 罗马音标签
            /// </summary>
            public string RomaTag { get => romaTag; set => romaTag = value; }

            /// <summary>
            /// 韩文标签
            /// </summary>
            public string KoTag { get => koTag; set => koTag = value; }
        }
    }
}